|
|
|
|
|
|
|
With PropBag
Call .WriteProperty("UpperCase", m_UpperCase, m_def_UpperCase)
Call .WriteProperty("Digits", m_Digits, m_def_Digits)
Call .WriteProperty("Numeric", m_Numeric, m_def_Numeric)
'
Call .WriteProperty("CheckRange", m_CheckRange, m_def_CheckRange)
Call .WriteProperty("LowValue", m_LowValue, m_def_LowValue)
Call .WriteProperty("HighValue", m_HighValue, m_def_HighValue)
'
Call .WriteProperty("CheckSize", m_CheckSize, m_def_CheckSize)
Call .WriteProperty("MinLength", m_MinLength, m_def_MinLength)
Call .WriteProperty("MaxLength", m_MaxLength, m_def_MaxLength)
'
Call .WriteProperty("Required", m_Required, m_def_Required)
'
Call .WriteProperty("CheckConditional", m_CheckConditional,
m_def_CheckConditional)
'
Call .WriteProperty("Text", Text1.Text, UserControl.Name)
End With
'
End Sub |
|
|
|
|
|
|
|
|
Listing 5.43 shows the complete code for the ReadProperties event. Match this to the one in your project. |
|
|
|
|
|
|
|
|
Listing 5.43. Final version of the ReadProperties event. |
|
|
|
|
|
|
|
|
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
'
' read design-time property values
'
With PropBag
m_UpperCase = .ReadProperty("UpperCase", m_def_UpperCase)
m_Digits = .ReadProperty("Digits", m_def_Digits)
m_Numeric = .ReadProperty("Numeric", m_def_Numeric)
'
m_CheckRange = .ReadProperty("CheckRange", m_def_CheckRange)
m_LowValue = .ReadProperty("LowValue", m_def_LowValue)
m_HighValue = .ReadProperty("HighValue", m_def_HighValue)
'
m_CheckSize = .ReadProperty("CheckSize", m_def_CheckSize)
m_MinLength = .ReadProperty("MinLength", m_def_MinLength)
m_MaxLength = .ReadProperty("MaxLength", m_def_MaxLength)
'
m_Required = .ReadProperty("Required", m_def_Required)
' |
|
|
|
|
|